/**
 * 
 */
package com.nari.heatshare.dao;

import java.util.Date;
import java.util.List;
import java.util.Map;

import com.nari.coreframe.dao.hibernate3.IGenericDao;
import com.nari.heatshare.model.ITemperaturePointDataGather;
import com.nari.heatshare.utils.queryvo.TempPointDataCustomizedQuery;
import com.nari.platform.model.PageCond;
import com.nari.platform.model.ResponseMsg;
import com.nari.platform.model.ResultWithPageCond;

/**
 * 
 * @author Xiaopeng
 * @date 2014-3-14
 */
public interface ITemperaturePointDataGatherDao extends IGenericDao<ITemperaturePointDataGather, String> {

	/**
	 * 根据温度点编号、所属集中器号、抄表时间查询温度点数据的唯一记录
	 * @param seriousNum
	 * @param concentratorNo
	 * @param recordTime
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2014-3-17
	 */
	public ITemperaturePointDataGather queryUniqueTempPointData(String seriousNum, String concentratorNo, 
			Date recordTime) throws Exception;
	
	/**
	 * 新增或修改温度点数据
	 * @param tempPointData
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2014-3-17
	 */
	public ResponseMsg saveOrUpdateTempPointData(ITemperaturePointDataGather tempPointData) throws Exception;
	
	/**
	 * 根据集中器号、抄表时间查询一个上传批次的温度点数据
	 * @param concentratorNo
	 * @param recordTime
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2014-3-17
	 */
	public List<ITemperaturePointDataGather> queryUploadBatchTempPointData(String concentratorNo, 
			Date recordTime) throws Exception;
	
	/**
	 * 统计集中器上传的有效温度点数据（避免档案资料中不存在的温度点信息被统计）
	 * @param concentratorNo
	 * @param recordTime
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2014-3-17
	 */
	public int countValidUploadBatch(String concentratorNo, Date recordTime) throws Exception;
	
	/**
	 * 根据温度点数据列表及集中器号查询其对应的温度点编号-房间号映射表
	 * @param tempPointDataList
	 * @param concentratorNo
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2014-3-23
	 */
	public Map<String, String> queryReferHouseNoMap(List<ITemperaturePointDataGather> tempPointDataList, 
			String concentratorNo) throws Exception;
	
	/**
	 * 根据温度点数据列表查询其对应的温度点编号-房间号映射表
	 * @param tempPointDataList
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2014-4-11
	 */
	public Map<String, String> queryReferHouseNoMap(List<ITemperaturePointDataGather> 
			tempPointDataList) throws Exception;
	
	/**
	 * 根据任务信息(集中器号、抄表时间)删除温度点数据批次
	 * @param concentratorNo
	 * @param recordTime
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2014-4-9
	 */
	public void deleteTempPointDataBatch(String concentratorNo, Date recordTime) throws Exception;
	
	/**
	 * 查询缺少基础档案信息的温度点数据对应的表号
	 * @param concentratorNo
	 * @param recordTime
	 * @param dataType
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2014-4-9
	 */
	public List<String> queryLackBaseinfoSeriousNum(String concentratorNo, Date recordTime,
			Integer dataType) throws Exception;
	
	/**
	 * 分页查询温度点数据定制查询列表
	 * @param projectUID
	 * @param communityUID
	 * @param buildingUID
	 * @param recordTime
	 * @param pageCond
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2014-4-11
	 */
	public ResultWithPageCond<TempPointDataCustomizedQuery> queryCustomizedQueryPage(String projectUID, 
			String communityUID, String buildingUID, Date recordTime, 
			PageCond pageCond) throws Exception;
	
	/**
	 * 根据定制查询特征信息(所属楼栋、抄表时间)统计温度点列表数据个数
	 * @param buildingUID
	 * @param recordTime
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2014-4-11
	 */
	public int countCustomizedTpDataList(String buildingUID, Date recordTime) throws Exception;
	
	/**
	 * 根据定制查询特征信息(所属楼栋、抄表时间)查询温度点列表数据
	 * @param buildingUID
	 * @param recordTime
	 * @return
	 * @throws Exception
	 * @author Xiaopeng
	 * @date 2014-4-11
	 */
	public List<ITemperaturePointDataGather> queryCustomizedTpDataList(String buildingUID, 
			Date recordTime) throws Exception;
}
